package learn_design_patterns.c5.threadsafe;

public class Singleton {
	private static Singleton instance;

	private Singleton() {
	}

	public synchronized static Singleton getInstance() {
		if (instance == null) {
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			instance = new Singleton();
		}
		return instance;
	}
}
